//
//  ClientUserModel.m
//  BCVersion
//
//  Created by 吴 崧 on 14-2-23.
//  Copyright (c) 2014年 Jungle. All rights reserved.
//

#import "ManagerSearchedModel.h"


@implementation ManagerSearchedModel

+(NSArray *)modelsWithDataSource:(NSArray *)dataSource
{
    __block NSMutableArray * result = [[NSMutableArray alloc]initWithCapacity:dataSource.count];
    [dataSource enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
        __weak NSDictionary *infoDic = (NSDictionary *)obj;
        ManagerSearchedModel *user = [[ManagerSearchedModel alloc]initWithDataSource:[infoDic copy]];
        [result addObject:user];
    }];
    
    __autoreleasing NSArray *finalArray = [[NSArray alloc]initWithArray:result];
    result = nil;
    dataSource = nil;
    return finalArray;
}



-(instancetype)initWithDataSource:(NSDictionary *)dataSource
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dataSource];
    }
    return self;
}

-(void)setWorkTime:(NSDictionary *)workTime
{
    _workTime = workTime;
    _workTimeString = [workTime valueForKey:@"name"];
}


@end
